#include <conf.h>
#include <kernel.h>
#include <proc.h>
#include <stdio.h>
#include <pa4.h>


int main()
{
dsk_buffer_p m= buf_head;
int index,inner;
char obuffer[128];
char buffer[128];
for(index=0;index<128;index++)
{
obuffer[index]='V';
}
int array[15]= { 2, 3, 7, 8, 9, 2, 1, 5, 2, 4, 5, 3, 2, 5, 2};
int random;
open(DISK0, 0, 0);
for(index = 0;index <= 1024;index++) {
kprintf("Iteration number : %d\n",index);
random=rand() % 1024;
read(DISK0, obuffer, random);
}
 kprintf("Displaying Buffer now!!");

while(m!=NULL)
        {
        kprintf("%d\n",m->block_no);
        m=m->next;
        }
close(DISK0);
return 0;
}

